package com.dearbinge.data.api.user;

import com.dearbinge.data.pojo.user.User;
import com.dearbinge.utils.PageResult;

import java.util.List;
import java.util.Map;

public interface UserService {

    User getById(Integer id, int i);

    /**
     * 根据id查用户
     * @param id id
     * @return 用户
     */
    User getUserById(Integer id);

    Integer insert(User user);

    Integer delete(Integer id);

    Integer update(User user);

    User getByOpendId(String opendId);

    PageResult<List<Map<String,Object>>> getOnLineUser(Integer compositor, Integer type, String district, Integer staAge, Integer endAge, String weight, String stature, Integer emotionalState,
                                                       Boolean sex, Double minLat, Double minLng, Double maxLat,
                                                       Double maxLng, Double longitude, Double latitude, Integer pageNo, Integer pageSize);

    Integer bindingPhone(String userId, String phone);

    Integer register(String userName, String pwd);

    Integer checkout(String userName);

    Integer login(String userName, String pwd);
}
